Debork
authorMatthias Clasen <matthiasc@src.gnome.org>
Fri, 4 Jul 2008 20:01:50 +0000 (20:01 +0000)
committerMatthias Clasen <matthiasc@src.gnome.org>
Fri, 4 Jul 2008 20:01:50 +0000 (20:01 +0000)
svn path=/trunk/; revision=20765

ChangeLog
gtk/gtkmenu.c

index 30ae06ae63e53fd8c87d71dc2ffef033814bb14b..d4f8ca044742afb7262d170725909473574d9059 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2008-07-04  Matthias Clasen  <mclasen@redhat.com>\
+
+       * gtk/gtkmenu.c: Debork the attach-widget property.
+
 2008-07-04  Michael Natterer  <mitch@imendio.com>
 
        Fix make check:
index 9d96c75ba291f792aad3782978b085cdaf525821..9687c3ab133335a87f68eac39ce2a10d02b9cebf 100644 (file)
@@ -536,16 +536,18 @@ gtk_menu_class_init (GtkMenuClass *class)
   /**
    * GtkMenu:attach-widget:
    *
-   * The widget the menu is attached to.
+   * The widget the menu is attached to. Setting this property attaches
+   * the menu without a #GtkMenuDetachFunc. If you need to use a detacher,
+   * use gtk_menu_attach_to_widget() directly.
    *
    * Since: 2.14
    **/
   g_object_class_install_property (gobject_class,
-                                   PROP_ACCEL_PATH,
-                                   g_param_spec_string ("attach-widget",
+                                   PROP_ATTACH_WIDGET,
+                                   g_param_spec_object ("attach-widget",
                                                        P_("Attach Widget"),
                                                        P_("The widget the menu is attached to"),
-                                                       NULL,
+                                                       GTK_TYPE_WIDGET,
                                                        GTK_PARAM_READWRITE));
 
   g_object_class_install_property (gobject_class,
@@ -792,7 +794,7 @@ gtk_menu_set_property (GObject      *object,
       gtk_menu_set_accel_path (menu, g_value_get_string (value));
       break;
     case PROP_ATTACH_WIDGET:
-      gtk_menu_attach (menu, g_value_get_object (value), 0, 0, 0, 0);
+      gtk_menu_attach_to_widget (menu, g_value_get_object (value), NULL);
       break;
     case PROP_TEAROFF_STATE:
       gtk_menu_set_tearoff_state (menu, g_value_get_boolean (value));